{{partial('public/header')}}
<!--main-->
<div class="midder">
  <div class="mc">
    <h1>{{strTopic['title']}}{% if strTopic['isaudit']==1 %}<font class="red">[审核中]</font>{% endif %}</h1>
    <div class="cleft"> 
             

{% if page == 1 %}

      <div class="topic-content clearfix">
        <div class="user-face"> <a href="{{url('group/people/'~strTopic['user']['doname'])}}"><img title="{{strTopic['user']['username']}}" alt="{{strTopic['user']['username']}}" src="{{strTopic['user']['face_48']}}" width="48"></a></div>
        <div class="topic-doc">
          <h3>
          <span>来自：<a href="{{url('group/people/'~strTopic['user']['doname'])}}">{{strTopic['user']['username']}}</a></span>
          <span class="color-green pl20">{{ date('Y-m-d H:i:s',strTopic['addtime'])}}</span>
          </h3>
          <div class="topic-view">{{strTopic['content'] | nl2br}}</div>
          
          <!--签名--> 
          {% if strTopic['user']['signed'] %}
          <div class="signed">{{strTopic['user']['signed']}}</div>
          {% endif %}
          
         
         
            <div class="options"> 
{% if strGroup['userid'] == visitor['userid']%}

&gt;&nbsp; 
<a href="{{url('group/topic/operation/'~strTopic['topicid']~'?op=istop')}}">{{arrOption['istop']}}</a> &gt;&nbsp; 
<a href="{{url('group/topic/operation/'~strTopic['topicid']~'?op=isdigest')}}">{{arrOption['isdigest']}}</a> &gt;&nbsp; 
<a href="{{url('group/topic/operation/'~strTopic['topicid']~'?op=isshow')}}">{{arrOption['isshow']}}</a> &gt;&nbsp; 
<a href="{{url('group/topic/operation/'~strTopic['topicid']~'?op=isreply')}}">{{arrOption['isreply']}}</a> &gt;&nbsp; 
{% if strTopic['userid'] == visitor['userid'] %}
<a href="{{url('group/topic/edit/'~strTopic['topicid'])}}">编辑</a> &gt;&nbsp;      
{% endif %} 
<a href="{{url('group/topic/operation/'~strTopic['topicid']~'?op=delete')}}" onclick="return confirm('确定删除?')">删除</a>
     
 
             
{% elseif strTopic['userid'] == visitor['userid'] %}

&gt;&nbsp; 
<a href="{{url('group/topic/edit/'~strTopic['topicid'])}}">编辑</a> &gt;&nbsp; 
<a href="{{url('group/topic/operation/'~strTopic['topicid']~'?op=delete')}}" onclick="return confirm('确定删除?')">删除</a> 
{% endif %}

            </div>
          
          
        </div>
      </div>
      
      <!--公共SNS组件-->	
      {{hook('SnsBar','show',['visitor':visitor, 'params':snsparams])}}   
      
      <div class="clear"></div>

      <div class="tags"></div>
      
{% endif %}
      
      <div class="clear"></div>
      
      
      <div> 
     	 {% if strTopic['upTopic'] %}
         上一篇：
         <a href="{{url('group/topic/'~strTopic['upTopic']['topicid'])}}">{{strTopic['upTopic']['title']}}</a>&nbsp;&nbsp;&nbsp;&nbsp;
         {% endif %}
         {% if strTopic['downTopic'] %}
         下一篇：
         <a href="{{url('group/topic/'~strTopic['downTopic']['topicid'])}}">{{strTopic['downTopic']['title']}}</a>
         {% endif %}
      </div>
      

      <!--comment评论-->
        <div class="mod">
           {{hook('Comment','show',['visitor':visitor, 'params':params])}}
        </div>
      
      
    </div><!--//cleft-->
    
    <div class="cright">
       {% if isGroupUser %}
        <div class="side-reg" id="g-side-info-member">
          <div class="bd">
              <div class="group-item">
                  <div class="pic">
                       <a href="{{url('group/show/'~strGroup['groupid'])}}"><img src="{{strGroup['icon_48']}}"></a>
                  </div>
                  <div class="info">
                      <div class="title">
                          <a href="{{url('group/show/'~strGroup['groupid'])}}">{{strGroup['groupname']}}</a>
                      </div>
                    <div class="member-info1">
                    
    {% if isGroupUser and strGroup['userid']!=visitor['userid'] and isGroupUser['isadmin']!=1 %}
     我是这个小组的{{strGroup['role_user']}} 
    {% elseif isGroupUser and  strGroup['userid']!=visitor['userid'] and isGroupUser['isadmin']==1%}
    我是这个小组的{{strGroup['role_admin']}}    
    {% elseif isGroupUser and  strGroup['userid']==visitor['userid'] %}
    我是这个小组{{strGroup['role_leader']}} 
    {% endif %}                    
                    
                    </div>
              </div>
            </div>
          </div>
        </div>   
     {% else %}
        <div class="side-reg" id="g-side-info">
          <div class="bd">
              <div class="group-item">
                  <div class="pic">
                       <a href="{{url('group/show/'~strGroup['groupid'])}}"><img src="{{strGroup['icon_48']}}"></a>
                  </div>
                  <div class="info">
                      <div class="title">
                          <a href="{{url('group/show/'~strGroup['groupid'])}}">{{strGroup['groupname']}}</a>
                      </div>
              </div>
            </div>
          </div>
          <div class="ft">
              <div class="member-status">
                <div class="ft-members">
                <i>{{strGroup['count_user']}}</i> 人聚集在这个小组<br>
                </div>
                {% if visitor %}
                <a class="bn-join" href="{{url('group/manage/join/'~strGroup['groupid']~'?refer=group/topic/'~strTopic['topicid'])}}">加入小组</a>
                {% else %}
                <a class="bn-join i a_show_login" href="{{url('group/manage/join/'~strGroup['groupid']~'?refer=group/topic/'~strTopic['topicid'])}}">加入小组</a>                
                {% endif %}
              </div>
          </div>
        </div>
      {% endif %}
      
      <h2>喜欢该帖子的人</h2>
      
      <div id="collects">
        {{partial('topic/like_user')}}
      </div>
      <h2 class="usf">最新话题</h2>
      <div class="indent newtopic">
        <ul>
          {% for item in newTopic %}
          <li><a title="{{item['title']}}" href="{{url('group/topic/'~item['topicid'])}}">{{item['title']}}</a> &nbsp; <span class="pl">(<a href="{{url('group/people/'~item['user']['doname'])}}">{{item['user']['username']}}</a>) </span> </li>
          {% endfor %}
        </ul>
      </div>
      <div class="clear"></div>

      
    </div>
    <!--//cright-->
    
    
  </div>
</div>
